package com.example.image;




import android.net.Uri;

import java.lang.ref.SoftReference;


public class ImageTan {

    private volatile static ImageTan instance;

    private ImageTan() { PicLru.getInstance(); }

    public synchronized static ImageTan getInstance() {

        if (instance == null) {
            synchronized (ImageTan.class) {
                if (instance == null) {
                    instance = new ImageTan();

                }
            }
        }
        return instance;
    }

    public ImageCreator load(Uri uri ){

        ImageCreator imageCreator = ImageCreator.getInstance(uri);
        SoftReference<ImageCreator> softReference = new SoftReference(imageCreator);

        return softReference.get();

    }

}
